home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Tool Chest / Interfaces / Universal Interfaces / CIncludes / String.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-06  |  2.0 KB  |  94 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3.     String.h
  4.     String handling
  5.     
  6.     Copyright Apple Computer,Inc.  1987-1990, 1993, 1994
  7.     All rights reserved
  8.  
  9. ************************************************************/
  10.  
  11.  
  12. #ifndef __STRING__
  13. #define __STRING__
  14.  
  15. #ifndef __size_t__
  16. #define __size_t__
  17. typedef unsigned long size_t;
  18. #endif
  19.  
  20. #ifndef NULL
  21. #define NULL 0
  22. #endif
  23.  
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27.  
  28. /*
  29.  *    Copying functions
  30.  */
  31.  
  32. void *memcpy (void *s1, const void *s2, size_t n);
  33. void *memmove (void *s1, const void *s2, size_t n);
  34. char *strcpy (char *s1, const char *s2);
  35. char *strncpy (char *s1, const char *s2, size_t n);
  36.  
  37. /* Apple library extentions.  The prefered mechanism for enabling these is by defining
  38.  * __useAppleExts__.  In the absence of this symbol, the __STDC__ symbol is used to 
  39.  * enable or disable these extentions. */
  40.  
  41. #if defined (__useAppleExts__) || \
  42.     ((defined (applec) && ! defined (__STDC__)) || \
  43.      (defined (__PPCC__) && __STDC__ == 0))
  44.  
  45. void *memccpy(void *s1, const void *s2, int c, size_t n);
  46.  
  47. #endif
  48.  
  49. /*
  50.  *    Concatenation functions
  51.  */
  52.  
  53. char *strcat (char *s1, const char *s2);
  54. char *strncat (char *s1, const char *s2, size_t n);
  55.  
  56. /*
  57.  *    Comparison functions
  58.  */
  59.  
  60. int memcmp (const void *s1, const void *s2, size_t n);
  61. int strcmp (const char *s1, const char *s2);
  62. int strcoll (const char *s1, const char *s2);
  63. int strncmp (const char *s1, const char *s2, size_t n);
  64. size_t strxfrm (char *s1, const char *s2, size_t n);
  65.  
  66.  
  67. /*
  68.  *    Search functions
  69.  */
  70.  
  71. void *memchr (const void *s, int c, size_t n);
  72. char *strchr (const char *s, int c);
  73. size_t strcspn (const char *s1, const char *s2);
  74. char * strpbrk (const char *s1, const char *s2);
  75. char *strrchr (const char *s, int c);
  76. size_t strspn (const char *s1, const char *s2);
  77. char *strstr (const char *s1, const char *s2);
  78. char *strtok (char *s1, const char *s2);
  79.  
  80.  
  81. /*
  82.  *    Miscellaneous functions
  83.  */
  84.  
  85. void *memset (void *s, int c, size_t n);
  86. char *strerror (int errnum);
  87. size_t strlen (const char *s);
  88.  
  89. #ifdef __cplusplus
  90. }
  91. #endif
  92.  
  93. #endif
  94.